﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace WeChatParking.Entity.Api
{
    /// <summary>
    /// 协议头尾
    /// </summary>
    public class Basics
    {
        /// <summary>
        /// 签名长度
        /// </summary>
        public int Signlen { get; set; }
        /// <summary>
        /// 签名
        /// </summary>
        public string Sign { get; set; }
        /// <summary>
        /// 功能号：1、网络连接状态心跳包，2、进出场数据上传，3、费率同步，4、预缴费（服务主动），5、现场缴费，6月租缴费查询
        /// </summary>
        public int Func_no { get; set; }
        /// <summary>
        /// 对话标识
        /// </summary>
        public string Guid { get; set; }
    }
    /// <summary>
    /// 心跳包
    /// </summary>
    public class Heartbeat : Basics
    {
        /// <summary>
        /// 车场客户端唯一代码
        /// </summary>
        public string Parking_code { get; set; }
    }
    /// <summary>
    /// 进出场数据
    /// </summary>
    public class InOrOut : Heartbeat
    {
        /// <summary>
        /// 车牌 长度16
        /// </summary>
        public string Car_plate { get; set; }
        /// <summary>
        /// 时间 长度12
        /// </summary>
        public string Time { get; set; }
        /// <summary>
        /// 类型0进场1出场 长度1
        /// </summary>
        public int Type { get; set; }
        /// <summary>
        /// 车型  1 小车 2 货车
        /// </summary>
        public int Car_type { get; set; }
        /// <summary>
        ///图片长度
        /// </summary>
        public int ImgLen { get; set; }
        /// <summary>
        /// 车主用户类型，1临时车、2月租车、3天租车、4时租车、5预留车
        /// </summary>
        public int CarUser_type { get; set; }
        /// <summary>
        /// 图片
        /// </summary>
        public byte[] Img { get; set; }
    }
    /// <summary>
    /// 预缴费
    /// </summary>
    public class ApiYPay : Basics
    {
        /// <summary>
        /// 车牌
        /// </summary>
        public string Car_plate { get; set; }
        /// <summary>
        /// 时间
        /// </summary>
        public string Time { get; set; }
        /// <summary>
        /// 费用  单位分
        /// </summary>
        public int Fee { get; set; }
        /// <summary>
        /// 车主用户类型，1临时车、2月租车、3天租车、4时租车、5预留车------------------9需要开闸车
        /// </summary>
        public int CarUser_type { get; set; }

    }
    /// <summary>
    /// 现场缴费
    /// </summary>
    public class XCPay : Heartbeat
    {
        /// <summary>
        /// 车牌
        /// </summary>
        public string Car_plate { get; set; }
        /// <summary>
        /// 时间
        /// </summary>
        public string Time { get; set; }
        /// <summary>
        /// 费用  单位分 长度8
        /// </summary>
        public int Fee { get; set; }
    }
    /// <summary>
    /// 状态应答
    /// </summary>
    public class StateYD : Basics
    {
        /// <summary>
        /// 状态值
        /// </summary>
        public int State { get; set; }
    }
    /// <summary>
    /// 费用查询应答
    /// </summary>
    public class StateFee : Basics
    {
        public int Fee { get; set; }
    }
    /// <summary>
    /// 费率同步
    /// </summary>
    public class Fee_cfg : Heartbeat
    {
        /// <summary>
        /// 车型  1 小车 2 货车
        /// </summary>
        public int Car_type { get; set; }
        /// <summary>
        /// 开始时间 6位
        /// </summary>
        public string BegTime { get; set; }
        /// <summary>
        /// 结束时间 6位
        /// </summary>
        public string EndTime { get; set; }
        /// <summary>
        /// 计费名称 20 位 不足补空格
        /// </summary>
        public string FeeName { get; set; }
        /// <summary>
        /// 日限额 5位 单位分
        /// </summary>
        public int FeeMax { get; set; }
        /// <summary>
        /// 有几条循环的计算方式  FeeType
        /// </summary>
        public int OrderID { get; set; }
        /// <summary>
        /// 循环的计算方式  FeeType   7的倍位
        /// </summary>
        public string Fee_type { get; set; }
    }
    /// <summary>
    /// 费用查询
    /// </summary>
    public class ApiFeeQuery : Basics
    {
        /// <summary>
        /// 车牌
        /// </summary>
        public string Car_plate { get; set; }
        /// <summary>
        /// 进场时间
        /// </summary>
        public string Time { get; set; }
    }
    public class ApiMonthFeeQuery : Basics
    {
        /// <summary>
        /// 车牌
        /// </summary>
        public string Car_plate { get; set; }
        /// <summary>
        /// 数量
        /// </summary>
        public int Num { get; set; }
    }
    public class FeeQuery
    {
        public int ID { get; set; }
        /// <summary>
        /// 客户端ID
        /// </summary>
        public string DeviceClient_code { get; set; }
        /// <summary>
        /// 物业ID
        /// </summary>
        public int EnterpriseID { get; set; }
        /// <summary>
        /// 物业名称
        /// </summary>
        public string EnterpriseName { get; set; }
        /// <summary>
        /// 停车场ID
        /// </summary>
        public int CCEnterpriseID { get; set; }
        /// <summary>
        /// 停车场名称
        /// </summary>
        public string CCEnterpriseName { get; set; }
        /// <summary>
        /// 进场时间
        /// </summary>
        public string Time { get; set; }
        /// <summary>
        /// 车牌
        /// </summary>
        public string Car_plate { get; set; }
        /// <summary>
        /// 金额
        /// </summary>
        public Decimal Fee { get; set; }
        /// <summary>
        /// 0 下发失败 1 未下发  2 下发中  3下发成功
        /// </summary>
        public int State { get; set; }
        /// <summary>
        /// 对话标识
        /// </summary>
        public string Guid { get; set; }
        /// <summary>
        /// 创建时间
        /// </summary>
        public DateTime create_time { get; set; }
    }

    public class YPay
    {
        public int ID { get; set; }
        /// <summary>
        /// 客户端ID
        /// </summary>
        public string DeviceClient_code { get; set; }
        /// <summary>
        /// 物业ID
        /// </summary>
        public int EnterpriseID { get; set; }
        /// <summary>
        /// 物业名称
        /// </summary>
        public string EnterpriseName { get; set; }
        /// <summary>
        /// 停车场ID
        /// </summary>
        public int CCEnterpriseID { get; set; }
        /// <summary>
        /// 停车场名称
        /// </summary>
        public string CCEnterpriseName { get; set; }
        /// <summary>
        /// 0 下发失败 1 未下发  2 下发中  3下发成功
        /// </summary>
        public int State { get; set; }
        /// <summary>
        /// 车牌
        /// </summary>
        public string Car_plate { get; set; }
        /// <summary>
        /// 时间
        /// </summary>
        public string Time { get; set; }
        /// <summary>
        /// 费用  单位分
        /// </summary>
        public int Fee { get; set; }
        /// <summary>
        /// 车主用户类型，1临时车、2月租车、3天租车、4时租车、5预留车    9开闸
        /// </summary>
        public int CarUser_type { get; set; }
        public string order_id { get; set; }
        public string Guid { get; set; }
        /// <summary>
        /// 创建时间
        /// </summary>
        public DateTime create_time { get; set; }
    }

    public class MonthFeeQuery
    {
        public int ID { get; set; }
        /// <summary>
        /// 客户端ID
        /// </summary>
        public string DeviceClient_code { get; set; }
        /// <summary>
        /// 物业ID
        /// </summary>
        public int EnterpriseID { get; set; }
        /// <summary>
        /// 物业名称
        /// </summary>
        public string EnterpriseName { get; set; }
        /// <summary>
        /// 停车场ID
        /// </summary>
        public int CCEnterpriseID { get; set; }
        /// <summary>
        /// 停车场名称
        /// </summary>
        public string CCEnterpriseName { get; set; }
        /// <summary>
        /// 数量
        /// </summary>
        public int Num { get; set; }
        /// <summary>
        /// 车牌
        /// </summary>
        public string Car_plate { get; set; }
        /// <summary>
        /// 金额
        /// </summary>
        public Decimal Fee { get; set; }
        /// <summary>
        /// 0 下发失败 1 未下发  2 下发中  3下发成功
        /// </summary>
        public int State { get; set; }
        /// <summary>
        /// 对话标识
        /// </summary>
        public string Guid { get; set; }
        /// <summary>
        /// 创建时间
        /// </summary>
        public DateTime create_time { get; set; }
    }
}
